package com.yanqu.road.server.cmd.activity.pawnshop;

import com.yanqu.road.pb.activity.PawnshopProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.pawnshop.CrossPawnshopMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_CROSS_PAWNSHOP_UPLOAD_POWER,desc = "")
public class PawnshopUploadPowerCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PawnshopProto.PawnshopCrossUploadPowerMsg msg = PawnshopProto.PawnshopCrossUploadPowerMsg.parseFrom(packet.getBytes());
        CrossPawnshopMgr.addGlobalPower(msg.getActivityId(), msg.getPower());
    }

    @Override
    public void sendData() {

    }
}
